var base = require('./baseTest');
var scheduleUtil = require('../util/scheduleUtil');
var config = require('../conf/config');
var schedule = require('../app/schedule');
var moment = require('moment');
var util = require('util');
var queryType = config.constant.queryType;
var period = config.constant.period;

var res = {
    json : function(result) {
        console.info(util.inspect(result,{ showHidden: true, depth: null, colors : true}));
    }
};

var scheduleCompute = function(){
    var schedules = [{timeScope : {start : moment('2015-12-12').toDate()}, repeat : period.DAY, subject :'测试'}];
    var result = scheduleUtil.computeBySize(schedules , new Date(), queryType.BACK, 10);

    console.info(result);
};

var listQuery = function(){
    var req = {body : {
        size : 10,
        startTime : '2015-01-22',
        type : config.constant.queryType.NEXT,
        isFirstPage: true,
        memberId : 'lisi'
    }};

    schedule.lisQuery(req, res);
};


// 执行
base.exec(listQuery);

